class Employer
{
    public:
        Employer(char* pname,char* paddr,char* pcity,char* pprov,char* pcode);//函数原型放在类定义中
        void changename();
        void display();
        //析构函数
        ~Employer();

    protected:     //数据成员设为保护
        char name[20];
        char addr[20];
        char city[20];
        char prov[20];
        char code[20];
}
//函数实现放在类外
Employer::Employer(char* pname,char* paddr,char* city,char* prov,char*code)
{
    strncpy(name,pname,sizeof(name));
    name[sizeof(name)-1]='\0';
    strncpy(addr,paddr,sizeof(addr));
    addr[sizeof(addr)-1]='\0';
    strncpy(city,pcity,sizeof(city));
    city[sizeof(city)-1]='\0';
    strncpy(prov,pprov,sizeof(prov));
    prov[sizeof(prov)-1]='\0';
    strncpy(code,pcode,sizeof(code));
    code[sizeof(code)-1]='\0';
}
Employer::display()
{
    cout<<"name"<<name<<endl;
}
int main()
{
    Employer e("a","b","c","d","e");
    e.display();
}